import { inject, injectable } from "inversify";
import { Uri } from "vscode";
import { IConfigurationService, Product } from "../common/types";
import { IServiceContainer } from "../ioc/types";
import { LinterInfo } from "./linterInfo";
import { ILinter, ILinterInfo, ILinterManager, LinterId } from "./types";

@injectable()
export class LinterManager implements ILinterManager {
    protected linters: ILinterInfo[];

    constructor(@inject(IConfigurationService) private configService: IConfigurationService) {
        // Note that we use unit tests to ensure all the linters are here.
        this.linters = [
            new LinterInfo(Product.bandit, LinterId.Bandit, this.configService),
            new LinterInfo(Product.flake8, LinterId.Flake8, this.configService),
            new LinterInfo(Product.pylint, LinterId.PyLint, this.configService, ['pylintrc', '.pylintrc']),
            new LinterInfo(Product.mypy, LinterId.MyPy, this.configService),
            new LinterInfo(Product.pycodestyle, LinterId.PyCodeStyle, this.configService),
            new LinterInfo(Product.prospector, LinterId.Prospector, this.configService),
            new LinterInfo(Product.pydocstyle, LinterId.PyDocStyle, this.configService),
            new LinterInfo(Product.pylama, LinterId.PyLama, this.configService),
        ];
    }
    getAllLinterInfos(): ILinterInfo[] {
        throw new Error("121Method not implemented.");
    }
    getLinterInfo(product: Product): ILinterInfo {
        throw new Error("122Method not implemented.");
    }
    getActiveLinters(resource?: Uri): Promise<ILinterInfo[]> {
        throw new Error("123Method not implemented.");
    }
    isLintingEnabled(resource?: Uri): Promise<boolean> {
        throw new Error("124Method not implemented.");
    }
    enableLintingAsync(enable: boolean, resource?: Uri): Promise<void> {
        throw new Error("125Method not implemented.");
    }
    setActiveLintersAsync(products: Product[], resource?: Uri): Promise<void> {
        throw new Error("126Method not implemented.");
    }
    createLinter(product: Product, serviceContainer: IServiceContainer, resource?: Uri): Promise<ILinter> {
        throw new Error("127Method not implemented.");
    }
}